package GenericStudy.test01;

public class GenericTest<E> {

    private String name;
    private int age;
    E e;

    public void a(E e){
    }

    public void b(E[] e){

    }

    static class SubGenericTest extends GenericTest<Integer>{

    }

    static class Demo{
        public static void main(String[] args) {
            // 父类指定泛型后  子类就可以不指定了
             SubGenericTest subGenericTest = new SubGenericTest();
             subGenericTest.a(10);
        }
    }

    static class SubGenericTest2<E> extends GenericTest<E>{

    }

    static class Demo2{
        public static void main(String[] args) {
            SubGenericTest2<String> subGenericTest2 = new SubGenericTest2<>();
            subGenericTest2.a("eeeee");
            subGenericTest2.e = "ddddd";
        }
    }

}
